home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -e
-
- # If the user has removed the config file, respect this sign of dementia
- # -- only create on package install.
-
- if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.99.7.1-3
- then
- if ! [ -f /etc/security/opasswd ]; then
- umask 066
- touch /etc/security/opasswd
- umask 022
- fi
- fi
-
- if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f /etc/environment ]
- then
- touch /etc/environment
- fi
-
- # Add PATH to /etc/environment if it's not present there or in
- # /etc/security/pam_env.conf
- if [ "$1" = "configure" ] && (dpkg --compare-versions 0.79-3ubuntu6 ge "$2" || [ "$2" = "" ]); then
- if ! grep -qs ^PATH /etc/security/pam_env.conf; then
- if ! grep -qs ^PATH /etc/environment; then
- echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"' >> /etc/environment
- fi
- fi
- fi
-
-
-